calculate molecular mass